package com.listen.playanddown.api;


import com.listen.playanddown.bean.MusicBean;

import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

public interface RequestServes {

    String BASE_URL = "http://s.fotoyou.cn/";

    //Field仅支持编码格式，form
    @POST("api/music")
    Observable<MusicBean> getMusic(@Query("page") String page);


    /*断点续传下载接口*/
    @Streaming/*大文件需要加入这个判断，防止下载过程中写入到内存中*/
    @GET
    Observable<ResponseBody> download(@Header("RANGE") String start, @Url String url);

}